This page last changed on May 31, 2006 by tcarlson.

The HiveMind container context allows you to obtain objects from a HiveMind registry to use as your UMO components or to wire other Mule objects such as connectors, transformers, agents, etc.

To use HiveMind with Mule you need to set the container context on the Mule manager.

<container-context
    className="org.mule.extras.hivemind.HiveMindContext"/>

No configurations are needed as the registry is build from standard HiveMind descriptors location: META-INF/hivemodule.xml, this goes across every classpath location and within every jar in your classpath.
If you want to have multiple HiveMind descriptors just use <submodule> elements.

Then to have your UMO components from HiveMind just specify the implementation attribute of the the component as the HiveMind complete service-point id, i mean <module-id>.<service-point>.

Lets say your hivemodule.xml looks like:

<module id="myBowl" version="1.0.0" package="org.example">
    <service-point id="Apple">
    <service-point id="Banana"/>
    <service-point id="FruitBowl"/>

    <implementation service-id="Apple">
     <invoke-factory>
      <construct class="Apple"/>
     </invoke-factory>
    </implementation>
    <implementation service-id="Banana">
     <invoke-factory>
      <construct class="Banana"/>
     </invoke-factory>
    </implementation>
    <implementation service-id="FruitBowl">
      <invoke-factory>
        <construct class="FruitBowl"/>
      </invoke-factory>
    </implementation>

</module>

In your mule descriptor you just have to

<mule-descriptor name="fruitBowlUMO" implementation="myBowl.FruitBowl">
    ...
</mule-descriptor>

The package attribute of module and interface attribute of service-point are optional and they both default to the respective id attribute, so you're free to mix them up as you want or need.

For more info about HiveMind and its features just look to the doc at Jakarta

Document generated by Confluence on Nov 27, 2006 10:27